<!-- Events inside the schedule chart -->
<div id="calendarSchedule">
    <table width="{{widthTable}}%" id="scheduleBackground">
    <tr>
        <td width="{{widthHourColumn}}%"></td>
        {% for day in header.days %}
        <td width="{{header.columnsWidth}}%" class="weekDayHeaders" id="td{{day.date}}">
            <a href="javascript: dojo.publish('Calendar2.anotherViewDayClick', ['{{day.date}}']);">
                {{day.dayAbbrev}}.{{day.date}}</a> &nbsp;
            <button dojoType="dijit.form.Button" showLabel="false" iconClass="add" class="addButton"
            onClick="dojo.publish('Calendar2.openForm', [0, null, '{{day.date}}']);">
            </button>
        </td>
        {% endfor %}
    </tr>
    {% for row in schedule %}
    <tr>
        <td class="hours">
            {{row.hour}}
        </td>
        {% for day in row %}
            {% ifequal row.even true %}
        <td class="emptyCellEven">
        </td>
            {% else %}
        <td class="emptyCellOdd">
        </td>
            {% endifequal %}
        {% endfor %}
    </tr>
    {% endfor %}
    </table>
</div>
<div id="eventsArea" style="float: left; position: absolute;">
    {% for event in events %}
    <div id="{{eventsAttr.divIdPre}}{{event.order}}" class="eventsDivMain"
    style="position: absolute; overflow: hidden;
        {% ifequal event.shown true %}
        visibility: visible;
        {% else %}
        visibility: hidden;
        {% endifequal %}
        ">
        <div id="plainDiv{{event.order}}" class="eventsDivSecond"
        style="border-width: {{eventsAttr.borderWidth}}px; cursor: pointer;"></div>
        <div dojoType="phpr.Calendar2.ResizeHandle" resizeAxis="y" activeResize="true" targetId="plainDiv{{event.order}}"
        id="eventResize{{event.order}}"
        style="bottom: 0; width: 100%; position: absolute;"></div>
    </div>
    {% endfor %}
</div>

<!-- Events outside the schedule chart -->
{% if furtherEvents.show %}
<br />
    {{furtherEventsMessage}}:<br />
    {% for event in furtherEvents.events %}
        {{event.time|safe}}:&nbsp;
        <a href="javascript: dojo.publish('Calendar2.openForm', [{{event.id}}, 0, 0, 0, '{{event.occurrence}}']);">
            {{event.summary|safe}}
        </a>
        <br />
    {% endfor %}
{% endif %}
